//
//  APTagConfiguration.swift
//  APSwift
//
//  Created by jianbo.pei on 2022/3/2.
//

import Foundation
import UIKit

open class APTagConfiguration: NSObject {
    /// 是否忽略点击选择（有些时候，只是展示，不可点击，优先级最高）
    public var isIgnoreSelected: Bool = false
    /// tagView最大宽度
    public var maxTagViewWidth: CGFloat = UIScreen.main.bounds.size.width - 32
    /// 最多可选择的数量，默认0（0：无限制）
    public var maxSelectedCount: Int = 0
    /// 单个tag的高度
    public var tagHeight: CGFloat = 50
    /// 单个tag的左边距
    public var tagLeftMargin: CGFloat = 12
    /// 单个tag的右边距
    public var tagRightMargin: CGFloat = 12
    /// 单个tag的圆角半径
    public var tagCornerRadius: CGFloat = 15
    /// 单个tag的normal/selected下的配置 （优先级低于`APTagModelProtocol`中的`tagAttributedString()`）
    public var tagNormalFont: UIFont = .systemFont(ofSize: 12)
    public var tagNormalTextColor: UIColor = UIColor(red: 125 / 255.0, green: 125 / 255.0, blue: 133 / 255.0, alpha: 1.0)
    public var tagNormalBgColor: UIColor = UIColor(red: 243 / 255.0, green: 243 / 255.0, blue: 246 / 255.0, alpha: 1.0)
    public var tagSelectedFont: UIFont = .boldSystemFont(ofSize: 12)
    public var tagSelectedTextColor: UIColor = UIColor(red: 25 / 255.0, green: 23 / 255.0, blue: 2 / 255.0, alpha: 1.0)
    public var tagSelectedBgColor: UIColor = UIColor(red: 254 / 255.0, green: 228 / 255.0, blue: 17 / 255.0, alpha: 1.0)
    /// tag之间的水平间距
    public var horizontalSpacing: CGFloat = 16
    /// tag之间的垂直间距
    public var verticalSpacing: CGFloat = 16

    open class func defaultConfiguration() -> APTagConfiguration {
        let config = APTagConfiguration()
        return config
    }
}
